package 力扣日常刷题.木23一月.第07天307;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 帅小伙
 * @date 2022/3/7
 * @description
 */
public class Demo03Excel表中某个范围内的单元格 {



    public List<String> cellsInRange(String s) {
        List<String> res = new ArrayList<String>();
        for (char c = s.charAt(0); c <=s.charAt(3) ; c++) {
            for (int i = s.charAt(1) - '0'; i <= s.charAt(4) - '0' ; i++) {
                res.add(String.valueOf(c) + String.valueOf(i));
            }
        }
        return res;
    }


}
